1
general::
Phrase(s): go to great lengths (to do something) [and] go to any lengths (to do something)
to work very hard to accomplish something; to expend great efforts in trying to do something. (See also go to any length.) • I went to great lengths to explain to him that he was not in any trouble.
McGrawhill's American Idioms And Phrasal Verbs